/**
 * elancom Corporation copy right 2012 - 2015  
 *   
 * $Header: https://192.168.1.224/svn/elancom/product/elancom-platform/trunk/src/main/java/com/elancom/framework/web/WebControllerAspect.java 1094 2012-07-06 12:08:51Z lanzhouxue $
 * $Id: WebControllerAspect.java 1094 2012-07-06 12:08:51Z lanzhouxue $
 * $Author: lanzhouxue $
 * $Date: 2012-07-06 20:08:51 +0800 (周五, 06 七月 2012) $
 * $Revision: 1094 $
 */
package com.elancom.framework.web;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * 控制器切入点
 * 
 * @author elancom
 * @date 2012-6-18
 */
@Aspect
public class WebControllerAspect {

	@Pointcut("@target(org.springframework.stereotype.Controller)")
	public void controllerMethods() {
	}

	@Around("controllerMethods()")
	public Object interceptor(ProceedingJoinPoint joinPoint) throws Throwable {
		Object retVal = null;
		try {
			retVal = joinPoint.proceed();
		} catch (Throwable e) {
			// if (e instanceof OutputErrorException) {
			// retVal = ((OutputErrorException) e).getOutput();
			// } else {
			// // log
			// throw e;
			// }
		} finally {
		}

		return retVal;
	}

}
